function mynew(fnc,...arr){
    let obj = Object.create(fnc.prototype)
    //var obj = {}
    //obj.__proto__= fnc.prototype
    var result = fnc.apply(obj,arr)
    //判断返回是对象还是函数
    return obj
}


console.log('-------------new----------');
function a(name){
    this.name = name
}

var b = mynew(a,'lwt')

console.log(b.__proto__=== a.prototype);
